<template>
	<u-form-item
			:label="label"
			prop="rlues"
			borderBottom
			@click="seletShowPop"
			ref="item1"
		>
		<u--input
				:value="dataValue"
				v-on:input="$emit('input',$event.target.value)"
				disabled
				disabledColor="#ffffff"
				:placeholder="`请选择${label}`"
				border="none"
		></u--input>
		<u-icon
				slot="right"
				name="arrow-right"
		></u-icon>
		 <u-datetime-picker
			:show="show"
			v-model="dateValue"
			@cancel="closeShow" @confirm="seletWays"
			mode="datetime"
	></u-datetime-picker>
	</u-form-item>
</template>

<script>

	export default{
		props: {
			
			label:{
				type:String,
				default:''
			},
			
			value:{
				type:String,
				default:''
			},
			rlues:{
				type:Object,
				default:{}
			},
			// 组件类型
			modeType:{
				type:String,
				default:'date'
			}
		},
		data() {
			return {
				show: false,
				dataValue:undefined,
				dateValue:Number(new Date())
			};
		},
		created(){
		},
		methods:{
			seletShowPop(){
				this.show = true
				uni.hideKeyboard()
			},
			seletWays(){
				this.dataValue = uni.$u.timeFormat(this.dateValue, 'yyyy-mm-dd hh:MM:ss')
				this.closeShow()
			},
			closeShow(){
				this.show = !this.show
			},
			
		}
	}
</script>

<style>
	
</style>